package com.chzc.fm.duotin.bean.mine;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by BillSinla on 2016/7/2.
 */
public class Anchor {

    /**
     * id : 1689980
     * is_v : 0
     * real_name : 诗音倩儿
     * image_url : http://c3.duotin.com/i1/DT/emuAiG7gccowLXeeVkW3au0sHshUJze2uiS2ouaCQLo.jpg
     * tags : [{"id":"4188","name":"心情"}]
     * describe : 微信公众号：诗音倩儿新浪微博：诗音倩儿
     * is_followed : 1
     * followed_num : 1
     * play_num : 748
     */

    private String id;
    private String is_v;
    private String real_name;
    private String image_url;
    private String describe;
    private int is_followed;
    private int followed_num;
    private int play_num;
    /**
     * id : 4188
     * name : 心情
     */

    private List<TagsBean> tags;

    public static Anchor objectFromData(String str) {

        return new Gson().fromJson(str, Anchor.class);
    }

    public static List<Anchor> arrayAnchorFromData(String str) {

        Type listType = new TypeToken<ArrayList<Anchor>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIs_v() {
        return is_v;
    }

    public void setIs_v(String is_v) {
        this.is_v = is_v;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getImage_url() {
        return image_url;
    }

    public void setImage_url(String image_url) {
        this.image_url = image_url;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public int getIs_followed() {
        return is_followed;
    }

    public void setIs_followed(int is_followed) {
        this.is_followed = is_followed;
    }

    public int getFollowed_num() {
        return followed_num;
    }

    public void setFollowed_num(int followed_num) {
        this.followed_num = followed_num;
    }

    public int getPlay_num() {
        return play_num;
    }

    public void setPlay_num(int play_num) {
        this.play_num = play_num;
    }

    public List<TagsBean> getTags() {
        return tags;
    }

    public void setTags(List<TagsBean> tags) {
        this.tags = tags;
    }

    public static class TagsBean {
        private String id;
        private String name;

        public static TagsBean objectFromData(String str) {

            return new Gson().fromJson(str, TagsBean.class);
        }

        public static List<TagsBean> arrayTagsBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<TagsBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
